Skip to content

feat: add web capabilities dashboard - #2100

Merged
affaan-m merged 3 commits into
affaan-m:mainfrom
mdayan8:feat/web-dashboard
Jun 15, 2026
Merged

affaan-m merged 3 commits into
affaan-m:mainfrom
mdayan8:feat/web-dashboard

Conversation

@mdayan8

@mdayan8 mdayan8 commented May 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A comprehensive web-based ECC Capabilities Dashboard that displays all agents, skills, commands, rules, MCP configs, and hooks in a modern, searchable UI.

Features

  • 63 Agent Cards — with model badges, tools, descriptions, category filters
  • 249 Skills — searchable grid with category filters
  • 79 Commands — searchable list with one-click copy to clipboard
  • 115 Rule Files — organized by language
  • MCP Configs — server details with commands and env vars
  • 25+ Hooks — full table with event, matcher, description
  • Search — real-time filtering with auto-suggestions
  • Drill-down pages — click any card for full details
  • 10 Languages — EN, PT, ZH, JA, KO, TR, RU, VI, TH, DE
  • Recently viewed — tracked via localStorage
  • Dark/light theme — persisted preference

Usage

npm run dashboard:web
# or
node scripts/dashboard-web.js

Then open http://localhost:3456

Files Changed

  • scripts/dashboard-web.js — new dashboard server (single file, zero deps)
  • package.json — added dashboard:web npm script

Summary by cubic

Adds a web-based ECC Capabilities Dashboard to browse agents, skills, commands, rules, MCP configs, and hooks with fast search and drill-down. Runs as a zero-dependency Node server via dashboard:web at http://localhost:3456, with a test suite covering loaders, API, and HTML rendering.

  • New Features

    • Single-file server: scripts/dashboard-web.js (no external deps). Reads repo data and serves JSON at /api/data; auto-opens browser.
    • Search with suggestions, filters, detail pages; one-click command copy; 10 locales; dark/light; recently viewed.
  • Bug Fixes

    • Escaped user-facing content to prevent XSS; masked MCP env vars in UI.
    • Port parsing with range validation and default fallback (3456); safer JSON/file parsing with graceful error handling.
    • Packaging: included scripts/dashboard-web.js in published files; package.json adds dashboard:web script.
    • Tests: added tests/scripts/dashboard-web.test.js and updated surface test to cover parsing, loaders, server routes, and HTML escaping.

Written for commit f870060. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features
    • Web-based dashboard to view agents, skills, commands, rules, configurations, and hooks.
    • Search with suggestions, filtering, keyboard navigation, theme switching, language selection, and copy-to-clipboard.
    • Detail pages, per-tab filtering, and “recently viewed” persistence.
    • Auto-opens in default browser and serves a JSON API for data access.
    • New CLI command to launch the dashboard.

@mdayan8
mdayan8 requested a review from affaan-m as a code owner May 31, 2026 13:36
@coderabbitai

coderabbitai Bot commented May 31, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a packaged CLI web server entrypoint (scripts/dashboard-web.js) and npm script that scans local project artifacts (agents, skills, commands, rules, MCPs, hooks), embeds datasets and i18n into a single HTML payload, serves a client-side dashboard with search/routing, and exposes /api/data; auto-opens the dashboard in the browser.

Changes

Dashboard Web Server

Layer / File(s) Summary
Script entry, package registration, and configuration
package.json, scripts/dashboard-web.js (lines 1–22)
Adds scripts/dashboard-web.js to published files, registers dashboard:web npm script, and defines port/root resolution from CLI args or ECC_DASHBOARD_PORT.
Project filesystem scanning and loaders
scripts/dashboard-web.js (lines 24–82)
Scans and parses agents, skills, commands, rules, MCP configs (.mcp.json and mcp-configs/*.json), and hooks/hooks.json; parses frontmatter and masks env values with defensive error handling.
i18n dictionary and payload preparation
scripts/dashboard-web.js (lines 83–108)
Embeds the LANG i18n dictionary, derives LANG_KEYS, and safely JSON-stringifies datasets and language strings for client inlining.
Static HTML template and inline styles
scripts/dashboard-web.js (lines 109–387)
Constructs the static HTML and extensive inline CSS for header, search, language selector, navigation, dashboard panels, toasts, footer, and responsive layout.
Client runtime: routing, rendering, and interactions
scripts/dashboard-web.js (lines 388–740)
Initializes globals, i18n helper, toasts/copy utilities, recently-viewed persistence, language/theme controls, hash-based routing, tab/detail renderers, search with grouped suggestions and keyboard navigation, and filtering.
HTTP server and browser launch
scripts/dashboard-web.js (lines 742–755)
Serves /api/data JSON and the dashboard HTML, starts listening on PORT, logs the URL, and attempts to open the default browser.

Sequence Diagram

sequenceDiagram
  participant CLI
  participant Server as HTTP Server
  participant FileSystem
  participant Browser

  CLI->>Server: npm run dashboard:web
  Server->>FileSystem: scan agents/, skills/, commands/, rules/
  FileSystem-->>Server: parsed artifact data
  Server->>FileSystem: load .mcp.json and mcp-configs/*.json
  FileSystem-->>Server: MCP configs (masked env values)
  Server->>FileSystem: load hooks/hooks.json
  FileSystem-->>Server: hooks data
  Server->>Server: renderHTML(data) -> embed datasets + i18n + client code
  Server->>Server: http.createServer() and listen(PORT)
  Server->>Browser: spawn browser with http://localhost:PORT
  Browser->>Server: GET /
  Server-->>Browser: rendered dashboard HTML
  Browser->>Server: GET /api/data
  Server-->>Browser: JSON datasets (agents, skills, commands, rules, MCPs, hooks)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Poem

🐰 I hopped through files to build a view,
Agents and skills all gathered in glue,
Languages, themes, and searches that sing,
A dashboard blooms — open the browser, take wing! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add web capabilities dashboard' accurately summarizes the main change—introducing a new web-based dashboard feature. It is concise, clear, and directly reflects the primary functionality added in the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Around line 344-345: The "dashboard:web" npm script references
scripts/dashboard-web.js but that file isn't included in the package whitelist,
so published installs won't have it; update package.json to ensure the file is
shipped by either adding "scripts/dashboard-web.js" (or the whole scripts/
directory) to the "files" array in package.json or move the script to a path
already included, and then verify the "dashboard:web" script still points to the
correct file name; refer to the "dashboard:web" script and the "files" array in
package.json and the actual file scripts/dashboard-web.js when making the
change.

In `@scripts/dashboard-web.js`:
- Around line 68-70: The code currently swallows JSON parse/read errors in
blocks that handle the '.mcp.json' file (variable m), the 'mcp-configs'
directory loop (fs.readdirSync -> f), and similarly for 'hooks/hooks.json' —
replace the empty catch{} blocks with explicit error handling that writes a
clear stderr warning including the filename/path and the error message (e.g.
using console.error or process.stderr.write) before continuing; update the catch
around JSON.parse(fs.readFileSync(...)) in both the m check and the mcp-configs
loop (and the hooks.json handling referenced) so the log shows which file failed
and the parse error to avoid silently dropping malformed configs.
- Around line 68-70: The code currently exposes full MCP env objects into the
response built by loadMcps (the r.push entries that include env: v.env || {}),
which is then served by the /api/data endpoint with Access-Control-Allow-Origin:
*; update loadMcps (or the logic producing those r.push items) to never include
raw secret values—either replace env with a list of keys (Object.keys(v.env ||
{})) or with redacted placeholders (e.g., map keys to "<redacted>") and remove
or tighten the wildcard CORS header on /api/data so cross-origin reads are not
allowed by default (only enable specific origins if truly required).
- Around line 494-500: The recent-item flow allows stored XSS because names are
injected into innerHTML and recents are persisted before verifying the route:
change the code so recents are only appended after a successful lookup (where
the route target is validated) and stop building the recent-bar with raw HTML
strings; instead, whitelist/validate r.t (allowed types: agents, skills,
commands, rules, mcps) and create each rb-item using document.createElement, set
element.textContent = r.n (not innerHTML) and attach its click via
element.addEventListener('click', () => location.hash =
'`#/`'+r.t+'/'+encodeURIComponent(r.n)) so names are not interpreted as HTML and
only validated targets are stored (update the logic around recents(), the
mapping that builds rb-items, and any code that persists r.n).
- Around line 537-540: renderSkills and the other render functions
(renderCommands, renderMcps, renderHooks) are inserting unescaped
repository-derived values directly into el.innerHTML and using inline onclick
handlers (e.g., copy(...), filterSkills(...)), which allows XSS; update each
renderer to never interpolate raw values into innerHTML — either build DOM nodes
via document.createElement and set textContent for names/descriptions/IDs or
ensure every inserted value passes esc() (apply esc() to s.n, s.d, command text,
IDs, etc.) and encode values used in attributes; replace inline onclick="..."
usages with data-* attributes (e.g., data-name/data-id) and attach event
listeners (e.g., click handlers using document.querySelectorAll or event
delegation) to call copy() or filterSkills, and ensure icon/class interpolation
(iBg, ICONS) cannot be influenced by external input.
- Around line 16-17: PORT currently comes directly from untrusted inputs
(process.argv[2] / ECC_DASHBOARD_PORT) without validation; change the code that
defines/uses PORT so you parse the value once, verify it is an integer within
1..65535, and if invalid print a clear error and exit with non‑zero status
before calling server.listen; update the constant used by listen (PORT) and add
the guard so values like "abc", negative numbers, zero, or >65535 fail fast with
a helpful message.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bb6a5a68-c998-48f7-b1db-ac3ed07d70dd

📥 Commits

Reviewing files that changed from the base of the PR and between 64cd1ba and 4c0b66e.

📒 Files selected for processing (2)
  • package.json
  • scripts/dashboard-web.js

Comment thread package.json Resolved
Comment thread scripts/dashboard-web.js Outdated
Comment on lines +16 to +17
const PORT = parseInt(process.argv[2] || process.env.ECC_DASHBOARD_PORT || '3456', 10);
const ROOT = path.resolve(__dirname, '..');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Validate PORT before calling listen().

process.argv[2] and ECC_DASHBOARD_PORT are system-boundary inputs. Values like abc, -1, or 70000 fall through until Node throws later. Parse once, range-check 1..65535, and fail with a clear message.

🔢 Suggested guard
-const PORT = parseInt(process.argv[2] || process.env.ECC_DASHBOARD_PORT || '3456', 10);
+const rawPort = process.argv[2] ?? process.env.ECC_DASHBOARD_PORT ?? '3456';
+const PORT = Number(rawPort);
+if (!Number.isInteger(PORT) || PORT < 1 || PORT > 65535) {
+  throw new Error(`Invalid ECC dashboard port "${rawPort}". Expected an integer between 1 and 65535.`);
+}

As per coding guidelines, "Always validate all user input before processing at system boundaries" and "Fail fast with clear error messages when validation fails".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/dashboard-web.js` around lines 16 - 17, PORT currently comes directly
from untrusted inputs (process.argv[2] / ECC_DASHBOARD_PORT) without validation;
change the code that defines/uses PORT so you parse the value once, verify it is
an integer within 1..65535, and if invalid print a clear error and exit with
non‑zero status before calling server.listen; update the constant used by listen
(PORT) and add the guard so values like "abc", negative numbers, zero, or >65535
fail fast with a helpful message.

Comment thread scripts/dashboard-web.js Resolved
Comment thread scripts/dashboard-web.js Resolved
Comment thread scripts/dashboard-web.js Outdated
Comment on lines +537 to +540
el.innerHTML = '<div class="filters" id="sf">'+['all','sec','test','pattern','design','research','data','agent','devops'].map((c,i)=>'<button'+(i===0?' class="active"':'')+' onclick="filterSkills(\\''+c+'\\',this)">'+[t('all'),'🔒 '+t('security'),'🧪 '+t('testing'),'📐 '+t('patterns'),'🎨 '+t('design'),'🔬 '+t('research'),'🗄️ '+t('data'),'🤖 '+t('agent'),'⚙️ '+t('devops')][i]+'</button>').join('')+
'</div><div class="grid" id="sg">'+list.map((s,i)=>'<div class="card" onclick="location.hash=\\'#/skills/'+encodeURIComponent(s.n)+'\\'">'+
'<div class="top"><div class="il"><div class="ic '+iBg(i%6)+'">'+ICONS[i%6]+'</div><span class="nm">'+esc(s.n)+'</span></div></div>'+
'<div class="desc">'+(s.d||'—')+'</div><span class="ar">↗</span></div>').join('')+'</div>';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | 🏗️ Heavy lift

Escape all repository-derived fields before writing innerHTML.

renderSkills, renderCommands, renderMcps, and renderHooks still interpolate raw descriptions, commands, IDs, and other file-backed values into HTML. A malicious markdown/JSON value like <img onerror=...> will execute in the browser. esc() needs to be applied consistently, and the inline onclick="copy('...')" pattern should be replaced with data attributes plus event listeners so quotes in names cannot break the markup.

As per coding guidelines, "Implement XSS prevention by sanitizing HTML output" and "Never trust external data (API responses, user input, file content)".

Also applies to: 545-550, 559-567, 584-590, 597-603

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/dashboard-web.js` around lines 537 - 540, renderSkills and the other
render functions (renderCommands, renderMcps, renderHooks) are inserting
unescaped repository-derived values directly into el.innerHTML and using inline
onclick handlers (e.g., copy(...), filterSkills(...)), which allows XSS; update
each renderer to never interpolate raw values into innerHTML — either build DOM
nodes via document.createElement and set textContent for names/descriptions/IDs
or ensure every inserted value passes esc() (apply esc() to s.n, s.d, command
text, IDs, etc.) and encode values used in attributes; replace inline
onclick="..." usages with data-* attributes (e.g., data-name/data-id) and attach
event listeners (e.g., click handlers using document.querySelectorAll or event
delegation) to call copy() or filterSkills, and ensure icon/class interpolation
(iBg, ICONS) cannot be influenced by external input.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 issues found across 2 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread scripts/dashboard-web.js Resolved
Comment thread scripts/dashboard-web.js Resolved
Comment thread scripts/dashboard-web.js Resolved
Comment thread scripts/dashboard-web.js Resolved
Comment thread scripts/dashboard-web.js Resolved
Comment thread scripts/dashboard-web.js Resolved
Comment thread scripts/dashboard-web.js Resolved
Comment thread scripts/dashboard-web.js Resolved
@affaan-m

affaan-m commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Nice read-only dashboard and it's safe (XSS-escaped, env vars masked). Two things before merge: it adds 755 uncovered lines under scripts/** which trips the repo's 80% coverage gate (please add tests), and CI is currently red — get it green. Also note it partially overlaps the existing python dashboard script.

@mdayan8
mdayan8 force-pushed the feat/web-dashboard branch from 8db23e1 to f870060 Compare June 7, 2026 06:25
@ecc-tools

ecc-tools Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR.

@mdayan8

mdayan8 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

Nice read-only dashboard and it's safe (XSS-escaped, env vars masked). Two things before merge: it adds 755 uncovered lines under scripts/** which trips the repo's 80% coverage gate (please add tests), and CI is currently red — get it green. Also note it partially overlaps the existing python dashboard script.

Rebased onto latest main, added 51 tests to hit the coverage gate, fixed the lint errors. Should be good to go now 👍

@alexraphael07-prog

Copy link
Copy Markdown

🤖 Bezalel Engine — Automated Code Review

1. Summary

Adds a Node-based dashboard server that exposes ECC metadata (agents, skills, commands, rules, MCP configs, hooks) via a local web UI. Registers a new npm script "dashboard:web" that starts the server on port 3456 (or $ECC_DASHBOARD_PORT). Single-file implementation (scripts/dashboard-web.js, 775 LOC). Adds unit tests.


2. Issues (bugs, vulns, logic)

line(s) issue type description & fix
47, 48, 56, 71, … **pa

@affaan-m
affaan-m merged commit d24c718 into affaan-m:main Jun 15, 2026
1 check passed
affaan-m added a commit that referenced this pull request Jun 15, 2026
- agent.yaml: register epic-* commands (#2236) and vue-review (#2241)
- package.json files: drop stray skills/ml-adoption-playbook entry (follows orphan-skill publish pattern; not in install-modules.json)
- unicode-safety: strip decorative emoji from dashboard-web.js (#2100) and brand-discovery refs (#2221) to pass the CI gate
- agent-compress: raise catalog token canary 5000 -> 6000 for the 67-agent catalog

Full suite green (2836/2836).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants